//
//  PlatformDataCell.m
//  WBBaseProject
//
//  Created by 吴斌 on 2018/3/5.
//  Copyright © 2018年 吴斌. All rights reserved.
//

#import "PlatformDataCell.h"
#import "PlatformDataView.h"

@implementation PlatformDataCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    UIView *line = [[UIView alloc] init];
    line.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(0);
        make.width.equalTo(1);
        make.height.equalTo(20);
    }];
    
    PlatformDataView *urserView = [[NSBundle mainBundle] loadNibNamed:@"PlatformDataView" owner:nil options:nil].firstObject;
    [self.contentView addSubview:urserView];
    [urserView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(0);
        make.right.equalTo(line.left).equalTo(0);
    }];
    
    PlatformDataView *moneyView = [[NSBundle mainBundle] loadNibNamed:@"PlatformDataView" owner:nil options:nil].firstObject;
    [self.contentView addSubview:moneyView];
    [moneyView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(0);
        make.left.equalTo(line.right).equalTo(0);
    }];
}

@end
